<template>
	<view class="order-page">
		<view>
			<u-notice-bar :text="text1" mode="closable"></u-notice-bar>
			<!-- 配送信息卡片 -->
			<view class="delivery-card">
				<view class="delivery-type">
					<view :class="{'delivery-type-select':current_delivery_type == 1}">外卖配送</view>
					<view :class="{'delivery-type-select':current_delivery_type == 2}">到店自取</view>
				</view>
				<view class="delivery-add-info">
					<view>
						<view class="delivery-address">许昌市魏都区阳光花墅</view>
						<view class="delivery-people"><text>邢晨旭</text><text>12312312123</text></view>
					</view>
					<view>></view>
				</view>
				<view class="delivery-date">
					<view>立即送出</view>
					<view>预计送达时间<text>></text></view>
				</view>
				<view class="pay-type">
					<view>支付方式</view>
					<view>微信支付<text>></text></view>
				</view>
			</view>
			<!-- 菜品信息预览 -->
			<view class="order-info-cart">
				<view class="order-shop-name">店铺名</view>
				<view class="order-dish-list">
					<view class="order-dish">
						<view class="order-dish-logo">logo</view>
						<view class="order-dish-info">
							<view class="order-dish-name order-common">
								<view>菜名</view>
								<view>价格</view>
							</view>
							<view>规格</view>
							<view>数量</view>
						</view>
					</view>
				</view>

				<view class="order-common">
					<view>打包费</view>
					<view>价格</view>
				</view>
				<view class="order-common">
					<view>配送费</view>
					<view>价格</view>
				</view>
				<view class="order-common">
					<view>优惠说明</view>
					<view>
						<view>小计<text class="order-info-price">21.9</text></view>
					</view>
				</view>
			</view>
			<!-- 备注 -->
			<view class="order-notes">
				<view class="order-common">
					<view>备注</view>
					<view>请填写口味偏好<text>></text></view>
				</view>
				<view class="order-common">
					<view>餐具份数</view>
					<view>必选<text>></text></view>
				</view>
			</view>
			
		</view>
		<!-- 底部按钮 -->
		<view class="order-submit">
			<view>合计<text>21.9</text></view>
			<view>
				<u-button type="primary" shape='circle' text="提交订单"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				text1: 'uView UI众多组件覆盖开发过程的各个需求，组件功能丰富，多端兼容。让您快速集成，开箱即用',
				current_delivery_type: 2
			}
		},
		methods: {

		}
	}
</script>

<style scoped>
	.order-page {
		background-color: #f5f5f5;
		margin: 0;
	}

	.order-page>view:not(.order-submit) {
		width: 96%;
		margin: 0 auto;
	}

	.delivery-card,
	.order-info-cart,
	.order-notes {
		display: flex;
		flex-direction: column;
		border-radius: 20upx;
		background-color: #ffffff;
		margin-top: 20upx;
		margin-bottom: 10upx;
		padding: 0 0 30upx 0;
	}

	.delivery-card>view:not(:first-child) {
		padding: 5upx 8upx;
	}

	.delivery-type {
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: space-around;
		align-items: center;
	}

	.delivery-type>view:first-child {
		border-top-left-radius: 20upx;
	}

	.delivery-type>view:last-child {
		border-top-right-radius: 20upx;
	}

	.delivery-type>view {
		width: 50%;
		height: 100upx;
		line-height: 100upx;
		text-align: center;
		background-color: #ffffff;
	}

	.delivery-type-select {
		background-color: #ccf0ff !important;
	}

	.delivery-add-info {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.delivery-address {
		font-size: x-large;
		font-weight: 499;
	}

	.delivery-people {
		display: flex;
		flex-direction: row;
		color: #9f9f9f;
	}

	.delivery-people>text:first-child {
		margin-right: 50upx;
	}

	.delivery-date,
	.pay-type {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		margin-top: 25upx;
	}

	.order-info-cart,
	.order-notes {
		padding: 10upx 8upx;
	}

	.order-shop-name {
		color: #9e9e9e;
	}

	.order-dish {
		display: flex;
		flex-direction: row;
	}

	.order-dish-logo {
		width: 15%;
	}

	.order-dish-info {
		flex: 1;
	}

	.order-common {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		margin-bottom: 10upx;
	}

	.order-info-price {
		font-weight: bold;
		font-size: 120%;
	}

	.order-submit {
		display: flex;
		justify-content: flex-end;
		flex-direction: row;
		align-items: center;
		width: 100%;
		height: 150upx;
		margin: 0;
		position: absolute;
		background-color: #ffffff;
		bottom: 0;
		z-index: 1;
	}
	.order-submit >view:last-child{
		width: 200upx;
		margin: 20upx 10upx;
	}
</style>